import pandas as pd
import numpy as np

def volume_is_increase(v_list):
    mean_volume = np.mean(v_list[:-1])
    std_volume = np.std(v_list[:-1], ddof=0)
    threshold = mean_volume + 2 * std_volume
    if v_list[-1] < threshold or v_list[-1]/v_list[-2] < 1.4:
        return False
    return True

def volume_is_decrease(v_list, day=1):
    mean_volume = np.mean(v_list[:-1])
    std_volume = np.std(v_list[:-1], ddof=0)
    threshold = mean_volume - 2 * std_volume
    if v_list[-1] > threshold or v_list[-1]/v_list[-2] > 0.7:
        return False
    return True
